<?php
  $names = array('Andrew','John','Peter','Nastin','Bill');
  $output = preg_grep('/^[a-j]/i', $names);
  print_r( $output );
